package com.demo.bean.scope.service;

import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author peter
 * @date 2022/2/6 22:46
 */
@Service
@Slf4j
public class AddService {

    private int num = 0;
    private static int staticNum = 0;

    public int addNum() {
        num++;
        log.info(StrUtil.format("num {}", num));
        return num;
    }

    public int addStaticNum() {
        staticNum++;
        log.info(StrUtil.format("num {}", staticNum));
        return staticNum;
    }
}
